package com.example.common.feign;

import com.example.common.result.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "user-service", fallback = UserFeignClientFallback.class)
public interface UserFeignClient {
    
    @GetMapping("/api/user/{id}")
    R getUser(@PathVariable("id") Long id);
    
    @GetMapping("/api/user/username/{username}")
    R getUserByUsername(@PathVariable("username") String username);
}
